<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>外间距塌陷问题</title>
    <style>
        .dad{
            height: 500px;
            width: 500px;
            background-color: green;
            padding-top: 50px;
            box-sizing: border-box;
        }
        .son{
            height: 200px;
            width: 200px;
            background-color: pink;
            /* 会把父级往下拉 */
            /* margin-top: 50px; */

        }
    </style>

</head>
<body>
    <div class="dad">
        <div class="son">son</div>
    </div>
</body>
</html>